<?php
  	namespace app\models;
?>
<!-- 整体的div start -->
<link href="/css/goods_detail.css" rel="stylesheet" type="text/css" />
<SCRIPT src="/js/jquery.js" type=text/javascript></SCRIPT>
<SCRIPT src="/js/base.js"   type=text/javascript></SCRIPT>
<script src="/js/goods_details.js" type="text/javascript" ></script>
<script src="/js/cart.js" type="text/javascript" ></script>
<SCRIPT src="/js/lib.js"  type=text/javascript></SCRIPT>
<SCRIPT src="/js/zzsc.js" type=text/javascript></SCRIPT>

<div class="wholeBody">
<div class="wholeBodyFirst">
	<div class="ciNav">
             <span>首页</span><span>></span><span>大市场</span><span>></span><span>上海大市场</span><!--http://image.51dh.local/< ?=$pics[0]['img_url']?> -->
	</div>
	<div class="cl"></div>
	<div class="tmClear">
		<!-- 左边图片展示 -->
		<div class="tmClearLeft">
			<div align="center">  
			<div id=preview>
            <div class=jqzoom id=spec-n1 >
                 <img src='<?=f_img($img_id)?>' jqimg='<?=f_img($img_id)?>' width=350 height=350 />
            </div>
            <div id=spec-n5>
                <div class=control id=spec-left>
                    <img src="/images/left.gif" />
                </div>
                <div id=spec-list>
                        <ul class=list-h>
                        <?php foreach ($photos as $values){?>
                            <li><img src='<?=f_img($values['img_id'])?>' border='0'/></li>
                        <?php }?>
                        </ul>
                </div>
                <div class=control id=spec-right>
                    <img src="/images/right.gif"  border="0" />
                </div>
            </div>
        </div>
		</div>
		<div style="text-align:center;clear:both">
		</div>
		</div>
		<!-- 右边文字说明 -->
		<div class="tmClearRight">
			<!-- 头部文字说明 div-->
			<div class="rightTop">
				<div class="diyi">
					<span><?=$name;?></span>
				</div> 
				<div class="dier">
					<?=$shuxing;?>
				</div> 
				<div class="disan">
					<span><?=$beizhu; ?></span>
				</div>
			</div>
			<!-- 商品情况说明   表格-->
			<div class="rightSecond">
				<div class="rightSecondRight">
					<table class="goodsTable">
						<tr>
                            <td class="goodsm">零售价格：</td>
                            <td class="oprice">￥<?=$price_shichang?></td>
						</tr>
						<tr>
                            <td class="goodsm">会员价格：</td>
                            <td class="nprice">￥<?=$price_huiyuan;?></td>
						</tr>
						<tr>
                            <td class="goodsm" valign="top">选择颜色：</td>
                            <td class="scolor">
                              <?php foreach ($colors as $k=>$value){?>
                                <div>
                                    <a href="javascript:void(0)">
                                    	<span class='diamond diamond2'>
                                    		<?php 
                                    		foreach ($value as $vc){
                                    			echo $vc;
                                    		}
                                    		?>
                                    	</span>
                                    </a> 
                                    <span class="sstock"></span>
                                </div>
                              <?php }?>
                             </td>
                        </tr>
                        <tr>
                            <td class="goodsm">购买数量：</td>
                            <td class="snumber">
                                <span class="jiannumber"><img src="/images/jiannumber.png"  border="0"/></span> 
                                <input type="text" class="shunumber" id="bnum" value="1" readonly="readonly"/> 
                                <span class="jianumber"><img src="/images/jianumber.png"  border="0"/></span>
                            </td>
                       </tr>
					</table>
				</div>
				<div class="yueShou">
					<div class="yueNumber">
						<div class="ziti">累计销量</div>
						<div class="shuliang">
							0
							<span class="ziti">台</span>
						</div>
					</div>
					<div class="yueNumber">
						<div class="ziti">用户评价</div>
						<div class="xingji">
							<img src="/images/xingxing.png" border="0"/>
							<img src="/images/xingxing.png" border="0"/>
							<img src="/images/xingxing.png" border="0"/>
							<img src="/images/xingxing.png" border="0"/>
							<img src="/images/xingxing.png" border="0"/>
						</div>
					</div>
				</div>
			</div>
			<!-- 供货说明  表格-->
			<div class="rightThird">
                            <div class="rightThirdDiv">
                                <table class="goodsTable">
                                    <tr>
                                        <td class="goodsm">供货渠道：</td>
                                        <td class="goodsm2 channel"><img src="/images/sishide.png" border="0"/><span></span></td>
                                    </tr>
                                    <tr>
                                        <td class="goodsm">配送方式：</td>
                                        <td class="speisong">
                                            <span>由</span>
                                            <img src="/images/51dinghuo.png" border="0"/>
                                            <span style="margin-left:3px;">发货，17：30前下单预计</span><span style="font-weight:bold">明日(<?php echo date('Y-m-d',strtotime('+1 day'));?>)</span><span>送达，节假日期间可能会有延误</span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="goodsm" valign="top">提供服务：</td>
                                        <td class="sfuwu">
                                            <img src="/images/daofu.png" border="0"/>
                                            <span>货到付款</span>
                                            <img src="/images/bluecard.png" border="0"/>
                                            <span>支持信用卡</span>
                                        </td>
                                    </tr>
                                </table>
                            </div>
			</div>
			<!-- 已购买 div -->
			<div class="havebuy">
<!-- 			< ?php f_d($this_goods_info);?> -->
				<span class="hui">已选择</span> <span class="cheng" id="buy_color"></span> 
				<span class="hui">数量</span> <span class="cheng" id="buy_num"> 1</span> <span class="hui">台</span>
			</div>
			<div class="cl"></div>
			<!-- 背景隔开 -->
			<div class="rightFour"><img src="/images/beijingtu.png" border="0"/></div>
			<!-- 加入购物车  - 关注--div -->
			<div class="rightFive">
				<span class="addcarspan">
                    <a href="javascript:void(0)">
                        <img src="/images/addcar.png" border="0"/>
                    </a>
                </span>
               <span class="cationspan"><img src="/images/cation.png" border="0"/></span>
			</div>
			
			<!-- 购物车弹出层 -->
			<div id="shoppingCart">
				<div id="shoppingCartHeader">
					<span class="headerLeft">商品已成功加入到购物车</span>
					<span class="headerRight"><a onclick="closeCart()"><img src="//images/ico_closebig1.gif"></a></span>
				</div>
				
				<div id="shoppingCartConten">
					<div class="contenLeft">
					 	<img src=""/>
					 </div>
				 
					<div class="contenRight">
						<h3></h3>
						<p></p>
						<p>颜色:<span class="cartColor"></span></p>
						<p>数量:<span class="cartNum"></span></p>
						<p>购买价格:<span class="cartPrice">￥</span></p>
					</div>
				</div>
					
				<div id="shoppingCartMessage">
				</div>
					
				<div id="shoppingCartSubmit">
					<span><a href="javascript:location.href='';"><img src="//images/goon_ico1.gif"></a></span>
					<span><a href="javascript:location.href='/site/cart';" ><img src="//images/jsico1.gif"></a></span>
				</div>
			</div>
			<!-- 购物车弹出层结束 -->
		</div>
	</div>
	<div class="cl"></div>
	<div class="ciunder">
		<div class="underLeft">
			<!-- 同类产品 -->
			<div class="leftWhole">
				<div class="leftTitle">
					<span>同类的其他品牌</span>
				</div>
				<div class="leftContent1">
				<?php for($i=0;$i<=20;$i++ ){?>
                	<a href="#">摩托罗拉</a>
                 <?php }?>
				</div>
				
			</div>
			<!-- 最终购买 -->
			<div class="leftWhole">
				<div class="leftTitle">
					<span>浏览了该商品的最终购买了</span>
				</div>
				<!-- pai排列商品 start div-->
				<?php for($i=0;$i<=1;$i++){?>
				<div class="leftContent">
					<a class="lastMaiImg" href="#">
						<img src="/images/goods/shouji.png" width="130" height="130" border="0"/>
					</a>
					<a href="#" class="lastXing">苹果ipone4s3G手机(金色)TD-LTE/TD-SCDMA/GSM</a> <span ></span>
					<span class="lastPrice">￥4999.00</span>
				</div>
				<?php }?>
				<!-- pai排列商品 end -->
			</div>
			<!-- 排行榜 -->
			<div class="leftWhole">
				<div class="leftTitle">
					<span>手机排行榜</span>
				</div>
				<div class="leftContent2 ">
					<div class="rank">
						<span class="kong"></span>
						<span class="shi1 ranksd">同价位</span>
						<span class="kong"></span>
						<span class="shi2">同品牌</span>
						<span class="kong"></span>
						<span class="shi3">同类别</span>
						<span class="kong"></span>
						<div class="cl"></div>
					</div>
					<!-- 排列商品 -->
				    <!-- 同价位 -->
                  <?php for($i=0;$i<=1;$i++){?>
                    <div class="rankCp tongP">
						<div class="numRank colorRed"><?=$i+1 ?></div>
						<div><a class="imgRank" href=''><img src="/images/goods/shouji.png" width="50" height="50" border="0"/></a></div>
						<div class="infoRank" style="width:135px;padding-left:1px;">
							<a href='' class="brandRank">
								苹果 <br/>
								ipone
							</a>
							<span class="priceRank">￥5288.00</span>
						</div>
						<div class="cl"></div>
					</div>
                    <?php }?>
					<!-- 同价位  end-->
					<!-- 同品牌 start-->
                   <?php for($i=0;$i<=1;$i++){?>
                    <div class="rankCp tongP">
						<div class="numRank colorRed"><?=$i+1 ?></div>
						<div><a class="imgRank" href=''><img src="/images/goods/shouji.png" width="50" height="50" border="0"/></a></div>
						<div class="infoRank" style="width:135px;padding-left:1px;">
							<a href='' class="brandRank">
								苹果 <br/>
								ipone
							</a>
							<span class="priceRank">￥5288.00</span>
						</div>
						<div class="cl"></div>
					</div>
                    <?php }?>
					<!-- 同品牌  end-->
					<!-- 同类别 start -->
                   <?php for($i=0;$i<=1;$i++){?>
                    <div class="rankCp tongP">
						<div class="numRank colorRed"><?=$i+1 ?></div>
						<div><a class="imgRank" href=''><img src="/images/goods/shouji.png" width="50" height="50" border="0"/></a></div>
						<div class="infoRank" style="width:135px;padding-left:1px;">
							<a href='' class="brandRank">
								苹果 <br/>
								ipone
							</a>
							<span class="priceRank">￥5288.00</span>
						</div>
						<div class="cl"></div>
					</div>
                    <?php }?>
					<!-- 同类别end -->
				</div>
			</div>
			<!-- 排行结束 -->
			<!-- 还购买了 -->
			<div class="leftWhole">
				<div class="leftTitle">
					<span>浏览了该商品的用户还购买了</span>
				</div>
				<div class="leftContent">
					<a class="lastMaiImg" href="#">
						<img src="/images/goods/shouji.png" width="130" height="130" border="0"/>
					</a>
					<a href="#" class="lastXing">苹果ipone4s3G手机(金色)TD-LTE/TD-SCDMA/GSM</a> <span ></span>
					<span class="lastPrice">￥4999.00</span>
				</div>
			</div>
			<!-- 还购买了  结束 -->
			<!-- 还浏览了 -->
			<div class="leftWhole">
				<div class="leftTitle">
					<span>浏览了该商品的用户还浏览了</span>
				</div>
				<div class="leftContent">
					<a class="lastMaiImg" href="#">
						<img src="/images/goods/shouji.png" width="130" height="130" border="0"/>
					</a>
					<a href="#" class="lastXing">苹果ipone4s3G手机(金色)TD-LTE/TD-SCDMA/GSM</a> <span ></span>
					<span class="lastPrice">￥4999.00</span>
				</div>
			</div>
			<!-- 还浏览了的商品结果 -->
			<!-- 广告位1 -->
			<div  class="leftWhole">
				<a href="#" class="detailsAd">
					<img src="/images/ad/addad.png" width="210" height="260" border="0"/>
				</a>
			</div>
			<!-- 广告位2 -->
		</div>
	<!-- 中间部分 -->
		<div class="underMiddle">
			<div class="middleNav">
				<div class="bSelected shixin0">商品介绍</div>
				<div class="mSelected shixin1">规格参数</div>
				<div class="mSelected shixin2">商品评价</div>
				<div class="mSelected shixin3">售后保障</div>
				<div class="kong"></div>
			</div>
			<div class="cl"></div>
			<!-- 规格参数 -->
			<div class="guige disno" id="parameter">
                                <div class="clearfix">
                                    <div class="fl attinfo">
                                        <div class="guigeName">商品名称：</div>
                                        <div class="guigeDetail"></div>
                                    </div>
                                    <div class="fl attinfo">
                                        <div class="guigeName">颜色：</div>
                                        <div class="guigeDetail"></div>
                                    </div>
                                    
									<div class="fl attinfo">
                                        <div class="guigeName">是否录串：</div>
                                        <div class="guigeDetail"><?=$is_seril;?></div>
                                    </div>
                                    <div class="fl attinfo">
                                        <div class="guigeName">是否原封：</div>
                                        <div class="guigeDetail"><?=$is_intact;?></div>
                                    </div>
<!--                                    <div class="fl attinfo">-->
<!--                                        <div class="guigeName">是否自备：</div>-->
<!--                                        <div class="guigeDetail">--><?//=$is_self;?><!--</div>-->
<!--                                    </div>-->
                                </div>
				<!-- 产品特点  特殊超长说明 不要循环 -->
				
			</div>
			<!-- 商品评价 -->
			<div class="guige disno" id="commend">
				<div>
					<!-- 已有的评论 -->
					<div>
						<!-- 遍历成tr显示的评论div -->
						<div class="wallDiv">
							<table>
								<tr class="pinglunwall">
									<td colspan="3" class="wuping">用户评论</td>
								</tr>
								<tr class="pinglunwall">
									<td class="fl"><div class="pinglunren">大家好我叫王大锤：</div></td>
									<td class="pingluncontent fl"> 这正式一款不可多得的好产品，再不买就买不着了，大家赶紧来抢啊，蓝领胸甲 五金一件，为了部落 lok~tar</td>
									<td class="pingluntime fl">2014-12-10 12:90:78</td>
								</tr>
								<!-- 无评论 显示 -->
								<tr class="pinglunwall">
									<td colspan="3" class="wuping">该商品暂时没有任何用户评论！</td>
								</tr>
							</table>
						</div>
						<!-- 评论分页 -->
						<div>
							
						</div>
					</div>
					<!-- 发表评论 -->
					<div>
						<table>
							<tr>
								<td  class="guigeName">用户名：</td>
								<td class="guigeDetail">我要订货网0010013123112</td>
							</tr>
							<tr>
								<td class="guigeName">E-mail：</td>
								<td class="guigeDetail"><input type='text' placeholder="请填写正确的邮箱" class="pingEmail"></td>
							</tr>
							<tr>
								<td class="guigeName">评价等级：</td>
								<td class="pingDengDetail">
									<span style="margin-left:0px;"><input type="radio" name="flag"><img src="/images/wuxing.png" border="0"/></span>
									<span class="dier"><input type="radio" name="flag"><img src="/images/sixing.png" border="0"/></span>
									<span class="dier"><input type="radio" name="flag"><img src="/images/sanxing.png" border="0"/></span>
									<span class="dier"><input type="radio" name="flag"><img src="/images/liangxing.png" border="0"/></span>
									<span class="dier"><input type="radio" name="flag"><img src="/images/yixing.png" border="0"/></span>
								</td>
							</tr>
							<tr>
								<td class="guigeName">评价内容：</td>
								<td class="pingComtent">
									<textarea resize="none"></textarea>
									<a href="#"><img src="/images/fpinglun.png" border="0" /></a>
								</td>
							</tr>
						</table>
					</div>
				</div>
			</div>
			<!-- 售后保障 -->
			<div class="guige disno" id="ser">
				<div class="shouhouphone">
					<span>售后服务电话：025-52315151</span>
					<span>客戶服务电话：400-801-5151</span>
					<span>51订货网站：http://www.51dh.com.cn</span>
				</div>
				<div class="shouhoufuwu">
					<span class="title">服务承诺：025-52315151</span>
					<span class="content">51dh商城向您保证所售商品均为正品行货，并为您提供具有竞争力的商品价格和运费政策，请您放心购买 
							注：因厂家会在没有任何提前通知的情况下更改产品包装、产地或者一些附件，本司不能确保客户收到的货物与商城图片、产地、附件
							说明完全一致。只能确保为原厂正货！并且保证与当时市场上同样主流新品一致。若本商城没有及时更新，请大家谅解！
					</span>
				</div>
				<div class="shouhoushen">
					<span class="title">权利声明：</span>
					<span class="content">51dh商城上的所有商品信息、客户评价、商品咨询、网友讨论等内容，是51dh商城重要的经营资源，未经		许可，禁止非法转载使用。
							注：本站商品信息均来自于厂商，其真实性、准确性和合法性由信息拥有者（厂商）负责。本站不提供任何保证，并不承担任何法律责任
					</span>
				</div>
			</div>
			<!-- 商品介绍 -->
			<div class="sjiesjao">
				<?=$content;?>
			</div>
		</div>
	<!-- 右边部分 -->
		<div class="underRight">
			<div>
				<div class="liuChengInfo">
					<ul class="erShang">
						<li><a href="#"> 订购流程</a></li>
						<li><a href="#"> 送达时效</a></li>
						<li><a href="#"> 关于发票</a></li>
						<li><a href="#"> 电话咨询</a></li>
					</ul>
				</div>
				<div class="erweima">
					<img src="/images/ad/weixinerweima.png" border="0"/>
				</div>
			</div>
		</div>
	</div>
</div>
</div>
<script>
$(function(){
	$('.diamond').click(function(){
		$(this).parent().parent().siblings().children('a').children('span').removeClass('diamond2').addClass('diamond1');
		$(this).removeClass('diamond1').addClass('diamond2');
	});
	var bnum =parseInt($("#bnum").val());
	$("#buynum").html(bnum);
	//数量增加
	$(".jianumber").click(function(){
		//alert(1);
		bnum = bnum + 1;
		$("#bnum").val(bnum);
		$("#buy_num").html(bnum);
	})
	//数量减少
	$(".jiannumber").click(function(){
		//alert(1);
		if(bnum >=2){
			bnum = bnum - 1;
		}else{
			bnum = 1;
		}
		$("#bnum").val(bnum);
		$("#buy_num").html(bnum);
	});
})
</script>